<%= form_for([:cpanel,@post]) do |f| %>
<fieldset>
  <legend></legend>
  <%= render 'shared/error_messages', :target => @post %>

  <div class="clearfix">
    <%= f.label :title %>
    <div class="input">
    <%= f.text_field :title, :class => "span10" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :body %>
    <div class="input">
    <%= f.text_area :body, :class => "span13", :style => "height:400px" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :user_id %>
    <div class="input">
    <%= f.text_field :user_id %> <%= @post.user.login if @post.user %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :tag_list %>
    <div class="input">
    <%= f.text_field :tag_list, :class => "xxlarge" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :source %>
    <div class="input">
      <%= f.text_field :source, :class => "span3", :placeholder => "某某博客" %>
    </div>t("common.save")
  </div>
  <div class="clearfix">
    <%= f.label :source_url %>
    <div class="input">
      <%= f.text_field :source_url, :class => "xxlarge", :placeholder => "http://" %>
    </div>
  </div>
  <div class="clearfix">
    <%= f.label :state %>
    <div class="input">
    <%= f.select :state, Post.state_collection %>
    </div>
  </div>
  <div class="actions">
    <%= f.submit t("common.save"), :class => "btn primary", :disable_with => t("common.saving") %>
    or
    <%= link_to 'Back', cpanel_posts_path %>
  </div>
<% end %>
